package model;

public class ProblemData implements Cloneable {
	public String file_name = "";
	public double[][] g;
	public double[] x_coord;
	public double[] y_coord;
	public int[] w;
	public boolean is_w = false;
	
	@Override
	protected ProblemData clone() {
		ProblemData newData = new ProblemData();
		
		newData.file_name = file_name;
		newData.g = new double[g.length][];
		for(int i = 0; i < g.length; i++) {
			newData.g[i] = new double[g[i].length];
			for(int j = 0; j < g[i].length; j++) {
				newData.g[i][j] = g[i][j];
			}
		}
		
		newData.x_coord = new double[x_coord.length];
		for(int i = 0; i < x_coord.length; i++) {
			newData.x_coord[i] = x_coord[i];
		}

		newData.y_coord = new double[y_coord.length];
		for(int i = 0; i < y_coord.length; i++) {
			newData.y_coord[i] = y_coord[i];
		}
		
		newData.w = new int[w.length];
		for(int i = 0; i < w.length; i++) {
			newData.w[i] = w[i];
		}

		newData.is_w = is_w;
		
		return newData;
	}
}
